package andrei.mower2.business;

public class MowerDriveResult implements Comparable<MowerDriveResult> {
	
	private final Long mowerIndex;
	private final MowerVector mowerEndVector;
	
	public MowerDriveResult(Long mowerIndex, MowerVector mowerEndVector) {
		this.mowerIndex = mowerIndex;
		this.mowerEndVector = mowerEndVector;
	}
	
	public String toOutputString() {
		StringBuilder sb = new StringBuilder();
		sb.append(mowerEndVector.position.x).append(" ");
		sb.append(mowerEndVector.position.y).append(" ");
		sb.append(mowerEndVector.direction);
		return sb.toString();
	}

	@Override
	public int compareTo(MowerDriveResult o) {
		return mowerIndex.compareTo(o.mowerIndex);
	}
	
	
}
